Htaccess

Exempel på hur en fil med Htaccess kan se ut

Förkortningar

  • Htaccess - Hypertext access
  • Symlink - Symbolic link
  • CORS - Cross-Origin Resource Sharing

Flaggor

  • B - escapebackreferences
  • C - chain
  • CO - cookie
  • DPI - discardpath
  • E - env
  • F - forbidden
  • G - gone
  • H - handler
  • L - last
  • N - next
  • NC - nocase
  • NE - noescape
  • NS - nosubreq
  • P - proxy
  • PT - passthrough
  • QSA - qsappend
  • QSD - qsdiscard
  • QSL - qslast
  • R - redirect
  • S - skip
  • T - type

Filändelser

  • .htaccess

Kommentarer

#

Unicode

AddDefaultCharset UTF-8

Felmeddelande för Not found

ErrorDocument 404 /404.html

Hatar du också CORS?

Header add Access-Control-Allow-Origin "*"

Directory listing in htaccess. Allow, Deny, Disable, Enable Directory Listing in .htaccess

Options +Indexes IndexIgnore * Options -Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?id=$1 [NC]

Can I change default_socket_timeout from my php code?

php_value default_socket_timeout 6000

HTTP headers

  • HTTP_USER_AGENT
  • HTTP_REFERER
  • HTTP_COOKIE
  • HTTP_FORWARDED
  • HTTP_HOST
  • HTTP_PROXY_CONNECTION
  • HTTP_ACCEPT

Connection & request

  • REMOTE_ADDR
  • REMOTE_HOST
  • REMOTE_PORT
  • REMOTE_USER
  • REMOTE_IDENT
  • REQUEST_METHOD
  • SCRIPT_FILENAME
  • PATH_INFO
  • QUERY_STRING
  • AUTH_TYPE

Server internals

  • DOCUMENT_ROOT
  • SERVER_ADMIN
  • SERVER_NAME
  • SERVER_ADDR
  • SERVER_PORT
  • SERVER_PROTOCOL
  • SERVER_SOFTWARE

Date and time

  • TIME_YEAR
  • TIME_MON
  • TIME_DAY
  • TIME_HOUR
  • TIME_MIN
  • TIME_SEC
  • TIME_WDAY
  • TIME

Specials

  • API_VERSION
  • THE_REQUEST
  • REQUEST_URI
  • REQUEST_FILENAME
  • IS_SUBREQ
  • HTTPS
  • REQUEST_SCHEME
Apache logotyp

Ägare

Metoder

Plats

Externa länkar